package com.example.demo11.controller;

import com.example.demo11.service.IndexService;
import com.example.demo11.service.ItestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

//@Controller
@RestController
@RequestMapping("")
public class IndexController {
    @Autowired
    private IndexService indexService;
    @Autowired
    private ItestService itestService;

    @RequestMapping(value="/index")
    public String index(){
//       String name =  indexService.index("xiaoxiaoping");
////        return "hello world!"+name;
//        return indexService.sel(1).toString();
        return itestService.index("xiaoxiaoping");
    }
}
